const path = require('path')
// const basename = 'User/info'
// const filename = 'abc.txt'
// const filepath = path.resolve(basename, filename)
// console.log(path.basename(filepath)) // abc.txt
// console.log(path.extname(filepath)) // .txt
// console.log(path.dirname(filepath))

// 2. join拼接路径
const baseUrl = '../Use/indfo'
const filename = 'abc.xt'
const filebaseName = path.join(baseUrl, filename)
console.log("filebaseName=====", filebaseName)

// 3. resolve的拼接
// resolve 会判断拼接的字符串中， 是否是存在/或者./或者../
const filebaseName1 = path.resolve(baseUrl, filename)
console.log('filebaseName1===', filebaseName1)
